<!--
 * @Description: 进度
 * 
 * @Author: XiongYaoYuan<xiongyaoyuan>
 * @Date: 2023-07-28 16:51:55
 * @FilePath: /yuxiuproweb/src/views/mes/pro/splitOrder/mods/schedule.vue
-->
<template>
  <el-dialog
    :close-on-click-modal="false"
    v-dialogDrag
    title="工序进度"
    :visible.sync="shows"
    width="700px"
    append-to-body
  >
    <el-table :data="productProcessList">
      <el-table-column type="index" label="序号" width="60"></el-table-column>
      <el-table-column label="工序" prop="processName"></el-table-column>
      <el-table-column label="完成时间" prop="updateTime"></el-table-column>
      <el-table-column label="操作人" prop="updateBy"></el-table-column>
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="shows = false">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { productProcess } from "@/api/asc/split";
export default {
  props: {
    show: Boolean,
    data: {
      type: Object,
    },
    type: {
      type: String,
      default: "CL",
    },
  },
  data() {
    return {
      productProcessList: [],
    };
  },
  computed: {
    shows: {
      get() {
        return this.show;
      },
      set(newValue) {
        this.$emit("update:show", newValue);
      },
    },
  },
  created() {
    this.productProcess();
  },
  methods: {
    productProcess() {
      productProcess({
        productId: this.data.productId,
        type: this.type,
      }).then(({ rows }) => {
        this.productProcessList = rows || [];
      });
    },
  },
};
</script>
